package com.ganbo.java8.lambda;

import lombok.Data;

@Data
public class Person {

    private int id;
    private String name;


    public static Person create(int id, String name, PersonCallback callback) {
        Person person = new Person();
        person.setId(id);
        person.setName(name);
        callback.callBack(person);
        return person;
    }


    public static void main(String[] args) {
        Person person = Person.create(1, "bruce", o -> System.out.println(o));
    }


}
